package com.bgs.config;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author Asia
 * @version 1.0
 * @description: TODO
 * @date 2021/9/28 15:00
 */
@Component
@Configuration
public class DirectExchangeTest {
    public static final String MONEY_DIRECT_EXCHANGE_NAME = "money.exchange.name";
    public static final String MONEY_DIRECT_EXCHANGE_ROUTING_KEY_NAME = "money.exchange.routing.key";
    public static final String REPERTORY_DIRECT_EXCHANGE_NAME = "repertory.exchange.name";
    public static final String REPERTORY_DIRECT_EXCHANGE_ROUTING_KEY_NAME = "repertory.exchange.routing.key";

    @Bean
    public DirectExchange moneyDirectExchange() {
        return new DirectExchange(MONEY_DIRECT_EXCHANGE_NAME);
    }
}
